package com.zmzncs.lmtc.module.customer.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zmzncs.lmtc.module.customer.pojo.card_record_park.CardRecordPark;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.customer.pojo.card_record_park.CardRecordParkDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 任建波
 * @since 2020-09-09
 */
@Repository
public interface CardRecordParkDao extends BaseMapper<CardRecordPark> {

    /**获取购买记录关联的停车场*/
    List<CardRecordParkDTO> getCardRecordParkList(Long cardRecordId);
    /**获取时长卡购买记录关联的停车场*/
    IPage<CardRecordParkDTO> getDurationCardRecordParkList(Page page, @Param("cardRecordId") Integer cardRecordId, @Param("keyword") String keyword);
    /** 添加购买记录关联的停车场*/
    int insertCardPark(@Param("cardRecordId")Long cardRecordId,@Param("parkIdList") List<Long> parkIdList);

    /**查询月卡购买记录关联停车场信息*/
    CardRecordParkDTO getCardRecordParkByRecordId(Long cardRecordId);
}
